<!DOCTYPE html><!--STATUS OK-->
<html><head>
<meta http-equiv="X-UA-Compatible" content="IE=7">
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>ks random map [var.out.ver]</title>
<link href="[var.out.html_res_root]/res/table.css" rel="stylesheet" type="text/css">
<link href="[var.out.html_res_root]/res/user.css" rel="stylesheet" type="text/css">
<link href="[var.out.html_res_root]/res/pager.css" rel="stylesheet" type="text/css">
<link rel='stylesheet' type='text/css' href='[var.out.html_res2_root]/res/TileB.css?ver=20120819_mod20140930'>
<script type="text/javascript" src="[var.out.html_res_root]/res/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="[var.out.html_res_root]/res/jquery.pager.js"></script>
<script type="text/javascript" src="[var.out.html_res_root]/res/util.js"></script>

<script type="text/javascript">

var url = '?ajax=1&c=show&a=[var.out.map_type; htmlconv=no]&d='+new Date().getTime();
$(document).ready(function(){
	var pager = $('#pager').pager({
		limit:15,
		buttonClickCallback:function(start,pager){
			loadPage(start,pager);
		}
	});
	loadPage(0,pager);
	
});

function loadPage(start,pager){
	$.getJSON(url+'&start='+start+'&limit='+pager.limit+'&d='+new Date().getTime(),function(result){
		$('#resultTable tr[class=row]').remove();
		if(result.success){
			var _html = '';
			if(result.rows!=null){
				for(var i=0;i<result.rows.length;i++){
					var r = result.rows[i];
					_html +='<tr style="height:20px" class=row>';					
					_html+='<td>'+(start+i+1)+'</td>';
					_html+='<td>'+gen_a_link(r.code,'#'+r.id)+'</td>';
					_html+='<td>'+r.create_date.replace(' ','&nbsp;')+'</td>';
					_html+='<td>'+(r.modify_date==null?'<center>-</center>':r.modify_date.replace(' ','&nbsp;'))+'</td>';
					var map_type = '';
					if(r.ud3=='1'){
						map_type = '随机地牢';
					}else{
						map_type = '随机地图';
					}
					_html+='<td>'+map_type+' '+r.ud4+'</td>';
					//_html+='<td>流量</td>';
					_html +='</tr>'
					
				}
				
			}
			$('#resultTable').append(_html);
			pager.setPageData({
				start:start,
				total:result.data
			});
		} else {
			var msg = '<font style="color:red">加载数据失败:</font>'+result.data;
			pager.setPageData({displayMsg:msg});
		}
	});
}

function gen_a_link(code,title){
	return '<a href="ks_map.php?ks=1&c=show&a=reload&debug=1&reload='+code+'" target="_blank">'+title+'</a>';
}

</script>
</head>
<body>

<p>
<a href="index.html" target="_home">home</a>  
&nbsp;<a href="?c=show&a=alllink" target="_allmap">all link</a>  
</p>

<div id="content">
	<div id="userDetailGridDiv">
		<table id="resultTable" style="border:1px solid #FFF;width:100%;">
			<tr class="trbg">
				<th style="width:60px"><center>序号</center></th>
				<th style="width:100px"><center>链接</center></th>
				<th style="width:150px"><center>创建时间</center></th>
				<th style="width:150px"><center>更新时间</center></th>
				<th style="width:100px"><center>地图大小</center></th>				
			</tr>
		</table>
		<div id="pager"></div>
		
	</div>
	<div style="clear:both;padding:15px;color:#000;text-align: left;"></div>

</div>
<!--
[var.out.time_log; htmlconv=no]
-->
</body>
</html>